package com.gildedrose;

import com.gildedrose.item.*;
import com.gildedrose.vo.Quality;

public class TextTestFixture {
    public static void main(String[] args) {
        System.out.println("OMGHAI!");

        ItemAdapter[] items = new ItemAdapter[]{
                new DexterityVest(10, Quality.create(20)), // 0
                new AgedBrie(2, Quality.create(0)), // 1
                new Elixir(5, Quality.create(7)), // 2
                new Sulfuras(0), // 3
                new Sulfuras(-1), // 4
                new Backstage(15, Quality.create(20)), // 5
                new Backstage(10, Quality.create(49)), // 6
                new Backstage(5, Quality.create(49)), // 7
                new Conjured(3, Quality.create(6))// 8
        };

        GildedRose app = new GildedRose(items);

        int days = 101;
        if (args.length > 0) {
            days = Integer.parseInt(args[0]) + 1;
        }

        for (int i = 0; i < days; i++) {
            System.out.println("-------- day " + i + " --------");
            System.out.println("name, sellIn, quality");
            for (Item item : items) {
                System.out.println(item);
            }
            System.out.println();
            app.updateQuality();
        }
    }

}
